<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@include file="/inc/taglibs.jsp" %>
<style>
.nolooked{font-weight:bold;}
</style>
<script>
var stat=['未下载','已下载'];
$(function (){
	initQueryForm();
	$.each($("td.stat"),function(i,td){
		var $td=$(td);
		$td.html(stat[$td.text()]);
	});
});
function delall(){
	var $ck=$(".ck:checked");
	if($ck.length>0){
		if(confirm("确定要删除此条数据？")==true){
			$.ajax({url:path+"/downloadurl/delete",data:$("#form1").serialize(),dataType:'json',success:function(msg){
				if(msg.stat=='S')
				middelbodyReload();
				showTip(msg.msg,null,1);
			}});
		}
	}else{
		alert("未选择数据！");
	}
}
</script>
<form id="form1" action="${path }/downloadurl/list" method="post" onsubmit="return pageSeach(this);">
<c:set var="formId" value="form1"/>
标题<input type="text" name="title" value="${title }">
<button type="submit"">查询</button>
<table class="listtable" cellpadding="0" cellspacing="0">
<thead>
<tr>
<td colspan="100%" style="font-weight:bold;">
<button onclick="delall();" type="button">删除</button>
</td>
</tr>
<tr>
<th><label><input type="checkbox" for="ck" onclick="checkall(this);">全选</label></th>
<th>标题</th>
<th>时间</th>
<th>状态</th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.data }" var="item" varStatus="stat">
<tr>
<td><input type="checkbox" name="ids" value="${item.id}" class="ck"></td>
<td width="100px"><a href="${item.url }" target="_blank">${item.title}</a></td>
<td>${item.recordtime }</td>
<td class="stat">${item.isdownload }</td>
</tr>
</c:forEach>
</tbody>
<tfoot>
<tr>
<td colspan="100%">
<%@include file="/inc/page.jsp" %>
</td>
</tr>
</tfoot>
</table>
</form>
